package net.huashitong.ssydt.task.vo;

import io.swagger.annotations.ApiModelProperty;
import net.huashitong.ssydt.task.entity.SsTaskTask;
import net.huashitong.ssydt.task.entity.SsTaskTaskRecord;

import java.io.Serializable;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2018.01.22
 */
public class TasksVO implements Serializable {

    private static final long serialVersionUID = -5900357082062730094L;
    @ApiModelProperty(value = "任务记录id")
    private Long taskRecordId;//任务记录id
    @ApiModelProperty(value = "名称")
    private String name;//名称
    @ApiModelProperty(value = "描述")
    private String content;//描述
    @ApiModelProperty(value = "奖励金币数")
    private Long goldNumber;//奖励金币数
    @ApiModelProperty(value = "状态 01未完成 02已完成(待领奖) 03已领奖励")
    private String status;//状态
    @ApiModelProperty(value = "类型 01签到 02文章刷题 03全真刷题 04评论点赞 05发表评论")
    private String type;//类型 01签到 02文章刷题 03全真刷题 04评论点赞 05发表评论
    @ApiModelProperty(value = "已完成次数")
    private Integer needNumber;//需要次数
    @ApiModelProperty(value = "已完成次数")
    private Integer alreadyNumber;//已完成次数

    public TasksVO(SsTaskTask taskTask, SsTaskTaskRecord ssTaskTaskRecord) {
        this.taskRecordId = ssTaskTaskRecord.getId();
        this.name = taskTask.getName();
        this.content = taskTask.getContent();
        this.type = taskTask.getType();
        this.goldNumber = ssTaskTaskRecord.getGoldNumber();
        this.status = ssTaskTaskRecord.getStatus();
        this.needNumber = taskTask.getNumber();
        this.alreadyNumber = ssTaskTaskRecord.getNumber();
    }


    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getTaskRecordId() {
        return taskRecordId;
    }

    public void setTaskRecordId(Long taskRecordId) {
        this.taskRecordId = taskRecordId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getGoldNumber() {
        return goldNumber;
    }

    public void setGoldNumber(Long goldNumber) {
        this.goldNumber = goldNumber;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getNeedNumber() {
        return needNumber;
    }

    public void setNeedNumber(Integer needNumber) {
        this.needNumber = needNumber;
    }

    public Integer getAlreadyNumber() {
        return alreadyNumber;
    }

    public void setAlreadyNumber(Integer alreadyNumber) {
        this.alreadyNumber = alreadyNumber;
    }

    @Override
    public String toString() {
        return "TasksVO{" +
                "taskRecordId=" + taskRecordId +
                ", name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", goldNumber=" + goldNumber +
                ", status='" + status + '\'' +
                ", type='" + type + '\'' +
                ", needNumber=" + needNumber +
                ", alreadyNumber=" + alreadyNumber +
                '}';
    }
}
